In a multi-processor environment, multiple processes or threads of an application program may request access to common information or data. The independence of the executing threads may lead to simultaneous operations being performed on certain data, which may lead to incorrect results. To prevent the foregoing, a thread may acquire a lock to prevent another thread from accessing or using the same resource at the same time. For example, during execution of a critical section of code in the process, a lock may be acquired by a thread to prevent the thread from sharing a particular resource until the lock is released.
Operating systems generally control access to a processor of the multi-processor environment. In some environments, priorities may be assigned to different processes or threads based in the relative importance or urgency of the functions performed by the thread. In some application programs, the thread may request a priority boost, such as before entering a critical section of code. The boosted priority may enable the thread to preempt other threads and access a shared resource controlled by a lock. When the thread is finished executing the critical section of code, the lock is released and the priority of the thread is unboosted (e.g., returning to a normal priority state).